feat: Allow passing arbitrary Tensorizer serialization and deserialization kwargs; update docs#7
Merged
sangstar merged 24 commits intosangstar/tensorizer-aws-update-and-any-kwargsfrom Jun 12, 2025
Conversation
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
…` and add to test Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
…serializer` Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Adjusts the regex string in `arg_utils.parse_type` to allow for newlines within the JSON string Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Eta0
suggested changes
Jun 10, 2025
Comment on lines
-275
to
-279
| self.deserializer_params = { | ||
| "verify_hash": self.verify_hash, | ||
| "encryption": self.encryption_keyfile, | ||
| "num_readers": self.num_readers | ||
| } |
There was a problem hiding this comment.
Please make sure that these three attributes are accounted for somewhere in self.deserializer_kwargs instead, even if they're deprecated.
Collaborator
Author
There was a problem hiding this comment.
Like I did with the handling of the stream params, I'll bring this code snippet back and have it be overwritten by self.deserialization_kwargs if available, like:
self.deserializer_params = {
"verify_hash": self.verify_hash,
"encryption": self.encryption_keyfile,
"num_readers": self.num_readers
}
self.deserializer_params.update(**self.deserialization_kwargs)Co-authored-by: Eta <24918963+Eta0@users.noreply.github.com>
Apply the batch of commits suggested in this review. Co-authored-by: Eta <24918963+Eta0@users.noreply.github.com>
Also fixes the logic for parsing different permutations for using the example script based on whether args are passed to CLI args directly or packaged in --model-loader-extra-config Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Eta0
suggested changes
Jun 10, 2025
Eta0
suggested changes
Jun 10, 2025
Co-authored-by: Eta <24918963+Eta0@users.noreply.github.com>
Co-authored-by: Eta <24918963+Eta0@users.noreply.github.com>
Co-authored-by: Eta <24918963+Eta0@users.noreply.github.com>
Signed-off-by: Sanger Steel <sangersteel@gmail.com>
Eta0
approved these changes
Jun 12, 2025
Eta0
left a comment
There was a problem hiding this comment.
All good. Just update the PR description with the simplified shell script, please.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature adding the following to the sangstar/tensorizer-aws-update-and-any-kwargs branch, which aims to add:
This is the kwargs-update portion. This PR adds:
TensorSerializerandTensorDeserializer, adding tests to confirm functionalityThe changes herein are succinctly described in a snippet to the updated docs, describing how to load a model using Tensorizer with the updated arbitrary kwargs without too much pain in constructing the JSON string. The kwargs here are just throwaways demonstrating the support.
Please hold off on any requests for changes relating to formatting. This will all be done in a later stage with vLLM's formatter.